<?php if (isset($success)) { ?>
    <p><?= $success?></p>
<?php } else { ?>
    <?php if (isset($error)) { ?>
        <p><?= $error?></p>
    <?}?>
    <?php echo $form->create(null,array('action' => 'contact', 'enctype' => 'multipart/form-data')); ?>
    <p>
        <?php echo $form->label('Page.name','Name: ',null); ?>
        <?php echo $form->text('Page.name', array('size' => '25'))?>
    </p>
    <p>
        <?php echo $form->label('Page.email','Email: ',null); ?>
        <?php echo $form->text('Page.email', array('size' => '25'))?>
    </p>
    <p>
        <?php echo $form->label('Page.message','Message: ',null); ?>
        <?php echo $form->textarea('Page.message', array('cols' => '40', 'rows' => '10'))?>
    </p>
    <p>
        <?php echo $form->submit('Send email')?>
    </p>
    <p>
        All fields are required!
    </p>
    <?php echo $form->end();?> 
<?php }?>